import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:mziot/app/modules/lighting/controllers/lighting_controller.dart';
import 'package:mziot/app/modules/lighting/views/lighting_view.dart';
import 'package:mziot/app/tools/tools.dart';
import 'package:mziot/generated/assets.dart';

class LightOffView extends GetView<LightingController> {
  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.center,
      mainAxisSize: MainAxisSize.max,
      children: [
        Expanded(child: _iconView),
        lightingBottomView(controller),
      ],
    );
  }

  get _iconView {
    return GestureDetector(
      onTap: () {
        throttle(() {
          controller.openAction();
        });
      },
      child: Image.asset(
        Assets.imagesLightLarge,
        width: 157,
        height: 157,
      ),
    );
  }
}
